import { reactive, ref } from 'vue'
import axios from 'axios'
  // https://dog.ceo/api/breeds/image/random
export default function (){
   let dogList = reactive([
  'https://images.dog.ceo/breeds/mountain-swiss/n02107574_2222.jpg',
  ])
  async function getDog() {
    try {
      let res = await axios.get('https://dog.ceo/api/breeds/image/random')
    dogList.push(res.data.message)
  } catch (error) {
    alert(error)
  }
  }

  return {dogList,getDog}
}